import request from '@/utils/request'

export default {
  //医院列表
  getHospList(page, limit, searchObj) {
    return request({
      url: `/unipay/hosp/hospital/list/${page}/${limit}`,
      method: 'get',
      params: searchObj   //---get方法，参数用params
    })
  },
  //根据dictcode查询所有子节点 （所有省）
  findByDictCode(dictCode) {
    return request({
      url: `/unipay/hospSet/cmn/findByDictCode/${dictCode}`,
      method: 'get'
    })
  },
  //根据数据id查询子数据列表
  findChildId(id) {
    return request({
      url: `/unipay/hospSet/cmn/findChildData/${id}`,
      method: 'get'
    })
  },

  //更新上线状态
  updateStatus(id, status) {
    return request({
      url: `/unipay/hosp/hospital/updateStatus/${id}/${status}`,
      method: 'put'
    })
  },
  //查看医院详情
  showHospDetaiByID(id) {
    return request({
      url: `/unipay/hosp/hospital/showHospDetail/${id}`,
      method: 'get'
    })
  },
  //查看科室信息
  getDeptByHoscode(hoscode) {
    return request({
      url: `/unipay/hosp/department/findDeptTree/${hoscode}`,
      method: 'get'
    })
  },
  //查看排班分页列表
  getPageSchedule(page, limit, hoscode, depcode) {
    return request({
      url: `/unipay/hosp/schedule/pageSchedule/${page}/${limit}/${hoscode}/${depcode}`,
      method: 'get'
    })
  },  
  //查看排班详情
  getScheduleDetail(hoscode, depcode, workDate) {
    return request({
      url: `/unipay/hosp/schedule/scheduleDetail/${hoscode}/${depcode}/${workDate}`,
      method: 'get'
    })
  },
}